package com.yun.service.Impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.yun.dao.UserDao;
import com.yun.entity.Files;
import com.yun.entity.User;
import com.yun.service.UserService;

@Service
public class UserServiceImpl implements UserService {
	@Resource
	private UserDao userDao;

	@Override
	public int addUser(User user) {

		return userDao.addUser(user);
	}

	@Override
	public User login(String phone, String userPwd) {
		// TODO Auto-generated method stub
		return userDao.findUserByPhoneAndPassword(phone, userPwd) ;
	}
	@Override
	public User findUserByPhone(String phone) {
		// TODO Auto-generated method stub
		return userDao.findUserByPhone(phone);
	}

	@Override
	public List<Files> findFilesByUserId(int userId) {
		// TODO Auto-generated method stub
		return userDao.findFilesByUserId(userId);
	}


	

}
